home *** CD-ROM | disk | FTP | other *** search
- <html>
- <head>
- <title>Class MsgBox - Evans Java Toolkit</title>
- <meta name="description" content="Evans Programming Java Toolkit - MsgBox">
- <meta name="keywords" content="msgbox, java, message, box, modal, toolkit">
- <meta name="DESIGN" content="Evans Programming, Hoffman Estates, IL">
- </head>
-
- <body bgcolor="#FFFFFF" link="#FF0000" vlink="#800000" alink="#FF00FF">
-
- <!--INCLUDESTART="JTCLSHDR.TXT"-->
- <center>
- <font face="Arial" size="5" color="0000FF">
- <strong>Evans Programming Java Toolkit</strong><br>
- </font>
- </center>
-
- <center>
- <font size="-2" face="Arial" color="FF0000">
- <strong>
- <a href="../jtkit.htm", target="_top">Java Toolkit Page</a> |
- <a href="../softwr.htm", target="_top">Software</a> |
- <a href="../index.html", target="_top">Home</a><br>
- </strong>
- </font>
- </center>
- <!--INCLUDESTOP="JTCLSHDR.TXT"-->
- <!--INCLUDESTART="JTPGIDX.TXT"-->
- <center>
- <font size="-2" face="Arial" color="FF0000">
- <strong>
- <a href="#DESCRIPTION">Description</a> |
- <a href="#EXAMPLES">Examples</a> |
- <a href="#CONSTRUCTORS">Constructors</a> |
- <a href="#METHODS">Methods</a>
- </strong>
- </font>
- </center>
- <!--INCLUDESTOP="JTPGIDX.TXT"-->
- <!--INCLUDESTART="JTPGNAV.TXT"-->
-
-
- <a href="install.htm">Previous</a>
- <a href="formtool.htm">Next</a>
- <a href="classidx.htm">Index</a><br>
-
- <!--INCLUDESTOP="JTPGNAV.TXT"-->
-
- <hr>
- <h1>Class MsgBox</h1>
-
- <pre>
- public class evans.toolkit.<strong>MsgBox</strong> extends Frame implements Runnable
- {
- // Constructors
- public <strong>MsgBox</strong>(Frame parent, String title,
- boolean modal, String msg, URL urlImage);
- public <strong>MsgBox</strong>(Frame parent, String title,
- boolean modal, String msg);
-
- // Methods
- /* This class has no methods */
- } </pre>
-
- <hr>
- <a name="DESCRIPTION"><img src="descript.gif" width=220 height=60 alt="Description"></a>
- <p>
- This class pops-up a framed message with an OK button, title and
- an image (optional). MsgBox closes when the OK button is pressed.
- The message is a wrap-around. MsgBox height automatically resizes
- itself to a max of 24 lines by 1/2 screen width.
- </p>
- <center><img src="msgbox.gif" width="265" height="140"></center>
- <p>
- Inserting the ASCII character 10 into the message adds carriage
- returns if desired.
- </p>
-
- <hr>
- <a name="EXAMPLES"><img src="example.gif" width=220 height=60 alt="Example"></a>
-
- <dl>
- <dt><h3>Modal Message With Carriage Returns Inserted and No Image</h3>
- </dl>
-
- <pre>
- import java.applet.*;
- import evans.toolkit.*;
-
- public void displayMessage()
- {
- // Create carriage return - svENTER
- final Character ocChar = new Character((char)10);
- final String svENTER = new String(ocChar.toString());
-
- // Create message with Carriage Returns Inserted
- String svMsg = "Line 1" + svENTER + "Line 2" + svENTER + svENTER + "Line 4";
-
- // Display message
- String svTitle = new String("Evans Java Toolkit Message");
- oMsgBox = new MsgBox(this, svTitle, true, svMsg);
- }</pre>
-
- <dl>
- <dt><h3>Non-Modal Message with Image</h3>
- </dl>
-
- <pre>
- import java.applet.*;
- import java.net.*;
- import evans.toolkit.*;
-
- public void init()
- {
- URL url = null;
-
- try
- {
- // Image in same dir as HTML doc
- url = new URL(getDocumentBase(), "exclam.gif");
-
- // Display modal message
- String svMsg = new String("Where do you want to be tomorrow?");
- String svTitle = new String("Evans Java Toolkit Message");
- oMsgBox = new MsgBox(this, svTitle, false, svMsg, url);
- }
- catch (MalformedURLException me)
- {
- }
- }</pre>
-
- <hr>
- <a name="CONSTRUCTORS"><img src="constrct.gif" width=220 height=60 alt="Constructors"></a>
-
- <dl>
- <dt><h3>MsgBox</h3>
- <dl>
- <dt><code>public <strong>MsgBox</strong>(Frame parent, String title,<br>
- <dd>boolean modal, String msg, URL urlImage);</code>
- </dl>
- <dd><p>Creates a message box with an image.</p>
- </dl>
-
- <dl>
- <dt><h3>MsgBox</h3>
- <dl>
- <dt><code>public <strong>MsgBox</strong>(Frame parent, String title,
- <dd>boolean modal, String msg);</code>
- </dl>
- <dd><p>Creates a message box without an image.</p>
-
- <dl>
- <dt><h4>Parameters:</h4>
- <dd><strong>parent</strong> - Frame - The parent object.
- <dd><strong>title</strong> - String - The message title.
- <dd><strong>modal</strong> - Boolean - True creates a modal MsgBox, false creates a modeless MsgBox.
- <dd><strong>msg</strong> - String - The message to display.
- <dd><strong>urlImage</strong> - URL - Specifies the image to display.
- </dl>
- </dl>
-
- <hr>
- <a name="METHODS"><img src="methods.gif" width=220 height=60 alt="Methods"></a>
-
- <p>
- This class has no methods.
- </p>
-
- <hr>
-
- <!--INCLUDESTART="JTPGNAV.TXT"-->
-
-
- <a href="install.htm">Previous</a>
- <a href="formtool.htm">Next</a>
- <a href="classidx.htm">Index</a><br>
-
- <!--INCLUDESTOP="JTPGNAV.TXT"-->
- <!--INCLUDESTART="JTPGIDX.TXT"-->
- <center>
- <font size="-2" face="Arial" color="FF0000">
- <strong>
- <a href="#DESCRIPTION">Description</a> |
- <a href="#EXAMPLES">Examples</a> |
- <a href="#CONSTRUCTORS">Constructors</a> |
- <a href="#METHODS">Methods</a>
- </strong>
- </font>
- </center>
- <!--INCLUDESTOP="JTPGIDX.TXT"-->
- <!--INCLUDESTART="JTCLSFTR.TXT"-->
- <center>
- <font size="-2" face="Arial" color="FF0000">
- <strong>
- <a href="../jtkit.htm", target="_top">Java Toolkit Page</a> |
- <a href="../softwr.htm", target="_top">Software</a> |
- <a href="../index.html", target="_top">Home</a><br>
- </strong>
- </font>
- </center>
-
- <p></p>
- <font size="-1">Evans Programming Java Toolkit HTML Document<br>
- Generated March 15, 1998<br>
- Revised Februrary 5, 1999<br>
- Copyright 1998-1999 Evans Programming<br>
- Send comments or corrections to <a href="mailto:davidLevans@megsinet.net">davidLevans@megsinet.net</a>
- </font>
- <!--INCLUDESTOP="JTCLSFTR.TXT"-->
-
- </body>
- </html>
-